package com.vogue.supplymall.cross.domain.mapper;

import com.vogue.supplymall.common.domain.dto.admin.OrganManagementInfo;
import com.vogue.supplymall.common.domain.dto.admin.ShopSearchInfo;
import com.vogue.supplymall.cross.domain.prodiver.NotOpenShopSqlProvider;
import com.vogue.supplymall.cross.domain.prodiver.OpenedOrganSqlProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;
import java.util.Map;

/**
 * The interface Cross mapper.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-05-15
 */
@Mapper
public interface CrossMapper extends BaseMapper<List, Long> {

    /**
     * Find not open shop list.
     *
     * @param shopSearchInfo the shop search info
     * @return the list
     */
    @SelectProvider(type = NotOpenShopSqlProvider.class, method = "find")
    List<Map<String, Object>> findNotOpenShop(ShopSearchInfo shopSearchInfo);

    /**
     * Find not open shop count long.
     *
     * @param shopSearchInfo the shop search info
     * @return the long
     */
    @SelectProvider(type = NotOpenShopSqlProvider.class, method = "findCount")
    Long findNotOpenShopCount(ShopSearchInfo shopSearchInfo);

    /**
     * Find opened organ list.
     *
     * @param info the info
     * @return the list
     */
    @SelectProvider(type = OpenedOrganSqlProvider.class, method = "find")
    List<Map<String, Object>> findOpenedOrgan(OrganManagementInfo info);

    /**
     * Find opened organ list.
     *
     * @param info the info
     * @return the list
     */
    @SelectProvider(type = OpenedOrganSqlProvider.class, method = "findCount")
    Long findOpenedOrganCount(OrganManagementInfo info);
}
